﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="Views.ViewSimulationResult"
	 xmlns:igCA="http://infragistics.com/Chart"  
    xmlns:VM="clr-namespace:OMANE.Modules.TauxGarantis.ViewModels" 
	d:DesignWidth="640" d:DesignHeight="480">

 <!--   <UserControl.DataContext>
        <VM:ViewModelSimulationResult />
    </UserControl.DataContext> !-->
        <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="5" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="5" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1"/>
            
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                  <ComboBox ItemsSource="{Binding Variables, Mode=OneWay}" DisplayMemberPath="ColumnName" SelectedItem="{Binding CurrentVariable}" >
                <ComboBox.Visibility>
                    <Binding Path="SimulationUseMultipleVariable">
                        <Binding.Converter>
                            <BooleanToVisibilityConverter />
                        </Binding.Converter>
                    </Binding>
                </ComboBox.Visibility>
            </ComboBox>
            <DataGrid xml:lang="fr-FR" AutoGeneratingColumn="DataGrid2_AutoGeneratingColumn"  Grid.Row="1" MinHeight="100" ItemsSource="{Binding FilteringData}" SelectedItem="{Binding Path=CurrentFilter}" Name="DataGrid2">
                <DataGrid.Visibility>
                    <Binding Path="SimulationUseMultipleVariable">
                        <Binding.Converter>
                            <BooleanToVisibilityConverter />
                        </Binding.Converter>
                    </Binding>
                </DataGrid.Visibility>
            </DataGrid>

            </Grid>
          
            <DataGrid xml:lang="fr-FR" ColumnWidth="*" Grid.Column="2" ItemsSource="{Binding SimulationData}" IsReadOnly="True" Name="DataGrid1">
               
            </DataGrid>
        </Grid>
        <Grid Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Border BorderBrush="#FF9F50F1" BorderThickness="3" CornerRadius="10" Margin="5,5,5,5" Padding="10" >
                <Grid>
                	<Grid.RowDefinitions>
                		<RowDefinition />
                		<RowDefinition Height="Auto"/>
                	</Grid.RowDefinitions>
                    <igCA:XamChart xml:lang="fr-FR">
                    	<igCA:XamChart.Series>
                    		<igCA:Series DataMapping="ValueX=X;ValueY=Y" DataSource="{Binding TriData, Mode=OneWay}" ChartType="ScatterLine" StrokeThickness="2">
                    			<igCA:Series.Marker>
                    				<igCA:Marker Foreground="{x:Null}"/>
                    			</igCA:Series.Marker>
                    			<igCA:Series.Animation>
                    				<igCA:Animation/>
                    			</igCA:Series.Animation>
                    		</igCA:Series>
                    	</igCA:XamChart.Series>
                    	<igCA:XamChart.Caption>
                    		<igCA:Caption Text="TRI" FontWeight="Bold" FontSize="18"/>
                    	</igCA:XamChart.Caption>
                        <igCA:XamChart.Legend>
                            <igCA:Legend  Visible="False"/>
                        </igCA:XamChart.Legend>    
                        <igCA:XamChart.Axes>
                            <igCA:Axis AxisType="PrimaryY">
                                <igCA:Axis.Label>
                                    <igCA:Label Format="{}{0:0.00%}" />
                                </igCA:Axis.Label>
                            </igCA:Axis> 
                        </igCA:XamChart.Axes>
                    </igCA:XamChart>
					<TextBlock Grid.Row="1" Text="{Binding CurrentVariable.ColumnName}" HorizontalAlignment="Center"  />
                </Grid>
            </Border>
            <Border BorderBrush="#FF9F50F1" BorderThickness="3" CornerRadius="10" Margin="5,5,5,5" Padding="10"  Grid.Column="1">
                <Grid>
                	<Grid.RowDefinitions>
                		<RowDefinition />
                		<RowDefinition Height="Auto"/>
                	</Grid.RowDefinitions>
                    <igCA:XamChart xml:lang="fr-FR" >
                        <igCA:XamChart.Legend>
                            <igCA:Legend Visible="False"/>
                        </igCA:XamChart.Legend>          
						<igCA:XamChart.Caption>
                    		<igCA:Caption Text="VAN" FontWeight="Bold" FontSize="18"/>
                    	</igCA:XamChart.Caption> 
						<igCA:XamChart.Series>
                    		<igCA:Series DataMapping="ValueX=X;ValueY=Y" DataSource="{Binding VanData, Mode=OneWay}" ChartType="ScatterLine" StrokeThickness="2">
                    			<igCA:Series.Marker>
                    				<igCA:Marker Foreground="{x:Null}"/>
                    			</igCA:Series.Marker>
                    			<igCA:Series.Animation>
                    				<igCA:Animation/>
                    			</igCA:Series.Animation>
                    		</igCA:Series>
                    	</igCA:XamChart.Series>
                        <igCA:XamChart.Axes>
                            <igCA:Axis AxisType="PrimaryY">
                                <igCA:Axis.Label>
                                    <igCA:Label Format="{}{0:#,#}" />
                                </igCA:Axis.Label>
                            </igCA:Axis>
                        </igCA:XamChart.Axes>
                    </igCA:XamChart>
              		<TextBlock Grid.Row="1" Text="{Binding CurrentVariable.ColumnName}" HorizontalAlignment="Center"  />
                  </Grid>
            </Border>
        </Grid>
        <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1"/>
    </Grid>
</UserControl>